import { ApprovalApplyStatusEnum } from '@/enums/orderEnum';
import { BasicColumn, FormSchema } from '@/components/Table';

export const tableColumns: BasicColumn[] = [
  { title: '订单编号', dataIndex: 'orderCode' },
  { title: '手机号', dataIndex: 'applicantPhone' },
  { title: '退款金额（元）', dataIndex: 'refundAmount' },
  { title: '审核时间', dataIndex: 'auditTime' },
  { title: '状态', dataIndex: 'status', slots: { customRender: 'status' } },
];

export const tableFormSchema: FormSchema[] = [
  {
    field: 'orderCode',
    label: '订单编号',
    component: 'Input',
    colProps: { span: 6 },
  },
];

const { APPROVED, REJECTED } = ApprovalApplyStatusEnum;
export const modalFormSchema: FormSchema[] = [
  {
    show: false,
    field: 'approvalApplyId',
    label: 'approvalApplyId',
    component: 'Input',
  },
  {
    required: true,
    field: 'status',
    label: '操作',
    component: 'RadioGroup',
    componentProps: {
      options: [
        { label: '通过', value: APPROVED },
        { label: '拒绝', value: REJECTED },
      ],
    },
  },
];
